Systems and Methods for Analyzing  Software

ABSTRACT

Disclosures herein describe methods and systems for detecting unlicensed content that can be accessed by electronic devices using an automated framework for analyzing applications present on the electronic device that allow a user of the electronic device to access unlicensed content.

CROSS REFERENCING OF RELATED APPLICATION

This application is based on and derives the benefit of U.S. Provisional Application No. 62/233,590, filed on Sep. 28, 2015, the contents of which are incorporated herein by reference.

TECHNICAL FIELD

The present disclosure relates to electronic devices and, more particularly, to detecting unlicensed content on electronic devices.

SUMMARY

An example embodiment herein discloses a method for determining if an application present on an electronic device allows the electronic device to access unlicensed content, the method including collecting, by a processor, data related to the application by the electronic device, wherein the data comprises of binary data and metadata; analyzing, by a processor, the collected data by the electronic device for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyzing, by a processor, the collected data and the dynamically called code by the electronic device; and determining, by a processor, if the application is accessing unlicensed content by the electronic device, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.

Embodiments herein disclose an apparatus operable to determine if an application present on an electronic device allows the electronic device to access unlicensed content, comprising a processor; and a memory device, operatively connected to the processor, and having stored thereon instructions that, when executed by the processor, cause the processor to collect data related to the application, wherein the data comprises of binary data and metadata; analyze the collected data for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyze the collected data and the dynamically called code; and determine if the application is accessing unlicensed content, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.

Embodiments herein disclose a system for determining if an application present on an electronic device allows the electronic device to access unlicensed content, comprising a content manager including circuitry configured to collect data related to the application, wherein the data comprises of binary data and metadata; an analysis module including circuitry configured to analyze the collected data for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyze the collected data and the dynamically called code; and the content manager further including circuitry configured to determine if the application is accessing unlicensed content, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.

These and other aspects of the example embodiments herein will be better appreciated and understood when considered in conjunction with the following description and the accompanying drawings. It should be understood, however, that the following descriptions, while indicating example embodiments and numerous specific details thereof, are given by way of illustration and not of limitation. Many changes and modifications may be made within the scope of the example embodiments herein without departing from the spirit thereof, and the example embodiments herein include all such modifications.

BRIEF DESCRIPTION OF THE FIGURES

The embodiments herein will be better understood from the following detailed description with reference to the drawings, in which:

FIG. 1 is a flowchart depicting an example method of detecting unlicensed content on an electronic device, according to example embodiments as disclosed herein;

FIG. 2 depicts the modules of the electronic device, according to example embodiments as disclosed herein;

FIG. 3 depicts an example workflow for detecting unlicensed content on an electronic device, according to example embodiments as disclosed herein;

FIG. 4 depicts an example de-obfuscating native code using JNIEXPORT and JNICALL methods, according to example embodiments as disclosed herein;

FIG. 5 depicts an example partial output of running objdump-s thelibrary.so, according to example embodiments as disclosed herein;

FIG. 6 depicts an example snippet of code from the com/mvl/-core/MapViewActivity.smali class showing use of the .line directive, according to example embodiments as disclosed herein;

FIG. 7 depicts a callstack called from within the mobile application, according to example embodiments as disclosed herein; and

FIG. 8 illustrates a plurality of components of an electronic device for detecting unlicensed content on an electronic device, according to example embodiments as disclosed herein.

DETAILED DESCRIPTION OF EMBODIMENTS

The example embodiments herein and the various features thereof are explained more fully with reference to the non-limiting embodiments that are illustrated in the accompanying drawings and detailed in the following description. Descriptions of well-known components and processing techniques are omitted so as to not unnecessarily obscure the embodiments herein. The description used herein is intended merely to facilitate an understanding of ways in which the example embodiments herein may be practiced and to further enable those of skill in the art to practice the embodiments herein. Accordingly, this disclosure should not be construed as limiting the scope of the example embodiments herein.

This disclosure describes methods and systems for detecting unlicensed content that can be accessed by electronic devices using an automated framework for analyzing applications present on the electronic device that allow a user of the electronic device to access unlicensed content. Unlicensed content herein indicates content that a user of the electronic device does not have authorization from the owner of the content to view and/or access the content. Examples of the content can be videos, audio clips, books, technical papers, or any other content that can be owned. In an example herein, the content may be protected under copyright and the electronic device can access the copyrighted content using an application present on the electronic device, without the permission of the copyright owner.

Electronic device as used herein can refer to a mobile phone, a smart phone, a tablet, a wearable computing device, a computer, a laptop, a convertible computing device (for example, which can serve as a laptop and a tablet), gaming devices, music/media players, vehicle based infotainment systems, and any other such device that includes at least one application.

FIG. 1 is a flowchart 100 depicting an example method of detecting unlicensed content on an electronic device. At step 101, the electronic device collects data related to one or more applications present on the electronic device. The electronic device can collect binary data and metadata associated with the applications. The electronic device can collect the binary data from the binary package of the applications. At step 102, the electronic device analyzes the collected data using both static and dynamic analysis techniques. The electronic device can analyze the data in an automated manner. The analysis can comprise of analyzing the code of the applications and at least one User Interface (UI) of the application. At step 103, the electronic device determines if the applications are accessing unlicensed content by comparing the network sources of the media requests made by the applications to a whitelist dataset that matches media sources for that specific content. The dataset of the sources that serve licensed content can be pre-defined or received, on demand, from the owner of the copyrighted content. In an embodiment herein, the electronic device can allow for the inspection of the results of the analysis. At step 104, the electronic device raises an alert if the applications are accessing unlicensed content. In yet another embodiment, if there is also an advertisement feed associated with the analyzed application, the system could potentially extract at least one advertising identifier from that feed. The advertising identifier may be used to identify the company whose advertisements are being placed in the application. The system may then inform the advertiser about the placement of its advertisements in the application. The various actions in method 100 may be performed in the order presented, in a different order or simultaneously. Further, in some embodiments, some actions listed in FIG. 1 may be omitted.

FIG. 2 depicts the modules of the electronic device 200. The electronic device 200, as depicted comprises of a content manager 201, an injection engine 202, an analysis engine 203, an extraction engine 204, and a memory 205. Each of these components may be implemented as a combination of hardware and software. The hardware may include microcontrollers, memory units (E.g., Dynamic Random Access Memory units, Random Access Memory units, Read Only memory units), and other such hardware components. The software may include assembly level code, machine language code, or source code, or any combination thereof, operable to function on the underlying hardware.

The electronic device 200 herein collects application packages and meta-data and generates an intermediate representation for any application code that is passed to an injection framework to extract back-end URLs (Uniform Resource Locators). The injection engine 202 performs dynamic analysis and binary instrumentation, wherein the back-end servers use URLs to stream content to the user using the applications. The content manager 201 can collect data related to any applications present on the electronic device 200. The content manager 201 can collect data from at least one external source, such as a file server, a data server, a cloud server, and so on. The content manager 201 can collect binary data and metadata associated with the applications. The content manager 201 can collect the binary data from the binary package of any application. The content manger 201 can send the collected data to the injection engine 202 and the analysis module 203. The injection engine 202 can be used to obtain, inspect, and possibly modify the parameter and return values. The analysis module 203 can analyze the collected data and data provided by the injection engine 202, using static and dynamic analysis techniques. The analysis module 203 can analyze the data in an automated manner and inform the injection engine of new parameters or changes creating a feedback loop. The analysis can comprise of analyzing the code of any application and at least one User Interface (UI) of one of the applications. Based on the analysis, the extraction engine 204 can extract back end URLs and advertisement identifiers, if present, from the output of the analysis engine 203 and the injection framework. After the analysis is performed, the content manager 201 can determine if the applications are accessing unlicensed content by comparing the network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content. The whitelist dataset of the sources that serve licensed content can be pre-defined or received, on demand from the owner of the copyrighted content. The content manager 201 can raise an alert if at least one of the applications is accessing unlicensed content.

The memory 205 can be at least one of an internal memory, an expandable memory storage unit (such as an Secure Digital (SD) card, micro SD card, and other suitable expandable storage means), an external storage unit, an external server, a file server, a data server, the Cloud, or any other equivalent storage mechanism. The memory 205 can comprise of applications installed on the electronic device 200. The memory 205 can comprise of the output of the analysis engine 203, the alerts provided by the content manager 201, and other related data. The memory 205 can comprise of files generated and/or used during the process of analyzing applications.

The content manager 201 can collect metadata data related to any application present on the electronic device 200. The content manager 201 can collect the binary data from the binary package of each of the application. The content manager 201 can collect binary data related to each of the applications. In an embodiment herein, the content manager 201 can collect the binary data from the binary package of each of the applications. The content manager 201 can create an intermediate representation of the collected data. The content manager 201 can exercise the user interface (UI) of the application to sample the functionality of the application. The content manager 201 can use at least one of an automated tool, and a manual control process to exercise the UI of at least one application. The content manager can reside within the electronic device or an external server locally or in the Cloud and can be connected with the electronic device via network, memory, or other available interfaces (e.g. USB).

The injection engine 202 can analyze native portions of at least one of the applications based on a pre-defined list of Application Programming Interface (API) method calls. The pre-defined list of API method calls can depend on the platform/operating system being used by the electronic device 200. The injection engine 202 can obtain, inspect, and possibly modify parameters and return values, associated with at least one of the applications. The injection engine 202 can intercept API method calls from native code, Java reflection, and dynamic class loading. The injection engine 202 can intercept API calls from dynamically loaded code. In addition, the injection engine 202 can examine specific instance of the object which has had its method called for non-static methods. The injection engine 202 can intercept constructor calls for dynamic class loading, so that at least one of the application's code can be instrumented statically or dynamically prior to being loaded at runtime. The injection engine 202 can infer API calls statically by examining rodata (read-only data) segment when examining output of using objdump on a native library or the runtime calls as at least one of the applications executes them. The dynamic analysis enables the injection engine 202 to resolve calls on-the-fly and perform instrumentation even in the presence of obfuscation. Moreover, it enables the analysis of code that might be provided dynamically by external communicating entities and not present in the application package. The injection engine 202 can capture network and file I/O performed by at least one of the applications.

The analysis engine 203 can analyze and tag the code. The code analyzed by the analysis engine 203 can comprise the application code and code uncovered by the injection engine 202 or even code received over the network during the execution of the inspected application. The analysis engine 203 can coordinate the operation of the execution modules and maintains shared data. The analysis engine 203 provides analysis that will feed into run-time program instrumentation and the injection engine 202. The analysis engine 203 can traverse the effective control graph of at least one application, including third-party libraries and code that was provided externally to the application. The analysis engine 203 can comprise of a plurality of execution modules, wherein the execution modules operate independently and concurrently take different execution paths through at least one application component. An execution module exists for a single unique execution path through any application component. The analysis engine 203 can use dynamic instrumentation to determine concrete values and program states that can serve as starting points for the analysis traversing the entire control and data flow of any application including network communications. The analysis engine 203 can use concrete values from the run-time execution as shortcuts in the analysis. The analysis engine 203 can offload file I/O streams by post-processing the log file, after the analysis has concluded. The analysis engine 203 can examine parameters to certain constructors and methods to obtain the full path to files that are read or written by the application. The analysis engine 203 can find the targeted API call. The analysis engine 203 can produce an output comprising of a method call graph, a control flow graph, output of an in-order traversal of the binary tree, a list of the jump values taken for each execution through the application component, and a list of relevant behaviors of the application component. The analysis engine 203 is responsible for providing an automated process for extracting the semantics of any interactions with external media servers and traversing their database to recover media sources that might be unlicensed content.

The extraction engine 204 can extract back-end URLs and advertisement identifiers from the output of the analysis engine 203 and the injection framework by collecting the URLs either from the application directly or using network traffic analysis. The extraction engine 204 can store the extracted URLs and any advertisement identifiers in a suitable location such as the memory 205, an external storage location, the Cloud, and any other suitable location. The content manager 201 can then determine if the application is accessing unlicensed content by comparing the originating back end servers and the associated URLs made by the application (the extracted URLs) to a whitelist dataset of sources that serve known licensed content. The whitelist dataset of the sources that serve licensed content can be pre-defined or received, on demand from the owner of the copyrighted content. The dataset can be present in the memory 205, an external storage location, the Cloud, an online server, a file/data server, or any other suitable location accessible to the electronic device 200. The content manager 201 can raise an alert if the application is accessing unlicensed content. The content manager 201 can raise an alert using at least one of a visual and audio mechanism. For example, the content manager 201 can send an alert in a format such as a network request, an email, a pop-up notification, a SMS (Short Messaging Service), a chat, a pre-recorded voice message, or any other suitable mechanism.

FIG. 3 depicts an example workflow for detecting unlicensed content on an electronic device. At step 301, the electronic device 200 collects metadata data related to at least one application present on the electronic device 200. The electronic device 200 can collect the binary data from the binary package of at least one application. At step 302, the electronic device 200 collects binary data related to at least one application. The electronic device 200 can collect the binary data from the binary package of at least one application. At step 303, the electronic device 200 creates an intermediate representation of the collected code. The intermediate representation is a higher-level abstraction of at least one application code that includes known Application Program Interfaces (APIs) that are resolved during runtime based on the execution of the application. The use of the intermediate representation is used to flag pertinent APIs for analysis by the analysis engine 203.

At step 304, the electronic device 200 samples the functionality of at least one application by exercising the user interface (UI) of the application. The electronic device 200 can use at least one of an automated tool, and a manual control process to exercise the UI of the application.

At step 305, the electronic device 200 analyzes the data for API method calls using an injection engine 202 to handle native portions of the application based on the pre-defined list of native Application Programming Interface (API) method calls. The injection engine 202 can obtain, inspect, and possibly modify parameters and return values, associated with the application. This includes file locations, network locations, additional keywords and other parameters that will allow one to explore local and remote code. For example, if one is looking for a movie in a remote database, the keywords Spiderman, Sp1derman, and Spid3rman can be used to locate the movie among other possible permutations of the term that phonetically sound similar. In addition, there are fields in the UI that are user generated that the injection engine will fill exercise with data provided by the analysis engine or externally. For instance, searching via the application APIs to a remote server for movie titles, one can iteratively inject different movie titles via the API to form a valid request to the back-end. This request might or might not yield any results on the back-end. The injection engine 201 can intercept API method calls from native code, Java reflection, and dynamic class loading. The injection engine 202 can intercept API calls from dynamically loaded code. In addition, the specific instance of the object which has had its method called is also examined for non-static methods. That is, the code can dynamically call other objects/codes. In particular, the targeted platform and OS API calls can be hooked before and after one of the targeted API calls executes which allows the present disclosure to modify the input and the output of the hooked mobile API method call. When using bytecode rewriting, binary files that are loaded at runtime must be rewritten before execution of the application continues so that the logging code is inserted. This can be accomplished by the injection engine 202 intercepting constructor calls for dynamic class loading, so that any application bytecode can be instrumented prior to being loaded at runtime. This only needs to be done once for each file containing bytecode if the optimized bytecode file is maintained from the previous time it was loaded. The injection engine 202 can infer API calls statically by examining rodata (read-only data) segment when examining output of using objdump on a native library.

Embodiments herein disclose two methods for capturing network and file I/O performed by the application. A first method hooks API method calls for I/O streams before or after they have been executed and capturing what is being written or read. For I/O-heavy applications, a second method can offload the logging of I/O-related API calls from the injection engine 202. In the second method, the API calls are not hooked to read from the I/O streams. A proxy is the used to perform a Man In The Middle (MITM) attack on the connection, so that the injection engine 202 is able to intercept the data sent over the network and even from SSL/TLS connections. This offloads the network I/O onto another program that captures the data. For applications that use certificate pinning to try to prevent a MITM attack on a connection, the injection engine 202 can obviate this by hooking Java methods (for example, javax.net.ssl.TrustManagerFactory) to allow any certificate to be accepted for the connection instead of the one that is pinned.

In an example embodiment, the electronic device 200 may run on Android. FIG. 4 depicts an example of de-obfuscating native code using JNIEXPORT and JNICALL methods. By monitoring the runtime behavior of at least one application while it executes on the device and performing dynamic and behavioral analysis, the analysis engine bypasses any code obfuscation. In FIG. 4, source code written in C is depicted, which uses an android.content. Context object passed in as a parameter to query the text messages on a mobile device. The android.database. Cursor object will be returned to the calling method where it can be used to obtain the text messages from the device. FIG. 5 depicts a partial output of running objdump-s thelibrary.so. The strings that are used as parameters to functions from native code can consequentially be seen as they show up in the C source code as depicted in FIG. 4. Examining the output, it can be seen that the android/net/Uri.parse.(Ljava/lang/String;)Landroid/net/Uri;, is the fully qualified API call. The period in the previous API call represents a value of 0x00, that is how objdump represents non-printable characters. The platform API usage in native code can be obfuscated by deriving some of the strings instead of hard-coding them in the code.

At step 306, the code is analyzed and tagged by the analysis engine 203. The code analyzed by the analysis engine 203 can comprise the application code and code uncovered by the injection engine 202. The analysis engine 203 coordinates the operation of the execution modules and maintains shared data-structures (for example, binary tree, results, and so on). The analysis engine 203 provides dynamic and behavioral analysis that will feed into run-time program instrumentation: when the execution hits the target instrumented code, the analysis engine 203 switches to controlled execution mode triggered by the instrumentation previously inserted in the code and would continue until it reaches a branch. For the encountered branch, the analysis engine 203 follows all paths forcing the execution to go down path that otherwise might have not been logically or data-flow accessible. The analysis engine 203 will traverse the effective control graph of at least one application in its entirety, including third-party libraries. The analysis engine 203 can comprise of a plurality of execution modules, wherein the execution modules operate independently and concurrently take different execution paths through an application component. An execution module exists for a single unique execution path through an application component. Upon completion of a path, the controller module re-initializes the execution module so it can take an new path through the application component, assuming all paths have not been taken and that the time limit, if one exists, has not elapsed. In addition, the analysis engine 203 uses dynamic instrumentation to determine concrete values and program states that can serve as starting points for fault injection and vulnerability discovery in all code areas. As a complementary technique, the analysis engine 203 can use concrete values from run-time execution as shortcuts in the analysis. This permits a complete exploration and automated analysis of the application code. The analysis engine 203 can produce an output comprising of a method call graph, a control flow graph, output of an in-order traversal of the binary tree based on the breadth first search traversal of the application call graph, a list of the jump values taken for each execution through the application component, a list of relevant behaviors of the application component. A control flow graph (CFG) in computer science is a representation, using graph notation, of all paths that might be traversed through a program during its execution. The application method call graph is a control flow graph of the specific application methods with each edge representing a call from one application method to another.

The analysis engine 203 offloads file I/O streams by post-processing the log file, after the analysis has concluded. A list of constructors and method calls from the API that are used for reading and writing files are available. The analysis engine 203 can map parameters to certain constructors (for example, java.io.FileInputStream. (java.io. File)) and method (for example, android.content.ContextWrapper .openFileOutput(java.lang. String,int)) to obtain the full path to files that are read or written by the application. The list of accessed files is generated as the log is parsed during post-processing. Thereafter, the files accessed by the application are deleted from the electronic device 200. The analysis engine 203 can check an exclusion list of files before a file or directory is deleted from the electronic device 200. For example, the analysis engine 203 does not delete the entire /mnt/sdcard/DCIM/Camera directory even though it is accessed to have its contents listed. The same goes for the /mnt/sdcard directory as well as other such directories.

In an example embodiment, the analysis engine 203 can preserve files by making files more persistent that they would otherwise be. The analysis engine 203 can hook calls such as java.io.File.delete( ) and provide an implementation that runs prior to the actual call and simply returns true and does not delete the file. The same approach can be done for temporary files by creating an actual file, so it will not be automatically deleted. This can help to preserve files so that they can be copied for later analysis.

In the present disclosure, an exclusion list of applications is used to ensure that the hooked API method calls in certain applications are exempt from logging process. The injection engine 202 can isolate a specific package name by writing the name to a file to be checked by the injection engine 202 or hard-coding it, but this requires that the device be rebooted whenever the package name changes or that a certain amount of time passes. To create the exclusion list, the injection engine 202 first creates a baseline of package names that are installed on the electronic device 200. These are the required applications and Operating System (OS) processes that should generally be excluded unless otherwise desired. The exclusion list can be a static and complete list so that any application on the exclusion list has its API method calls logged since it is not part of the exclusion list. After analysis of the application has completed, the application is removed from the electronic device. Then the next application can be installed and analyzed without rebooting the device. The exclusion list is implemented as a hash set of strings that represent the package name of applications and processes to be excluded. This only needs to be checked once by each process and then a static Boolean variable is set to true or false indicating whether that application is excluded from logging or not. Subsequently, to check if the application is exempt from logging, it can quickly just check a Boolean variable to determine it.

There are multiple methods to transfer the log entries from within the application to long-term storage. The possible logging methods include writing to the following locations: logcat, a named pipe, a file, and a memory-mapped file. In an embodiment herein, the analysis engine 203 can write to logcat without having to setup a file or pipe to write to. The logcat entry can be paginated, depending on the size of the entry. In other embodiments, the binary data from byte arrays can be written in binary and converted to a string representation when the log file is post-processed. In an embodiment herein, the events are written in a sequential order to the memory-mapped file due to the use of a lock to ensure mutual exclusion when writing. The analysis engine 203 can examine a relative ordering of API calls to give more context to what multiple API calls may be doing in aggregate. For example, it might be observed that the application queries SMS messages, writes them to a file, encrypts the file, and sends the encrypted file over the network. The analysis engine 203 can also record call the java.lang.System.identityHashCode (java. lang. Object) on all objects to identify common objects across various API calls.

The analysis engine 203 can find targeted API calls, wherein the application can call specific operations which can be invoked at runtime to perform tasks, for example, querying data; adding, updating, and deleting data; obtaining metadata about the data; and running utilities to perform administration tasks. In an example herein, consider that the electronic device 200 runs on Android. A smali format is a representation for the disassembled dex bytecode format that the Dalvik Virtual Machine (VM) uses. In some cases, the analysis engine 203 can identify the exact line of code in the smali file in which the targeted API method call occurred. The analysis engine 203 can obtain the smali files using a suitable means such as baksmali, which is used for reverse engineering an applications classes.dex file. Each smali file generally corresponds to a Java file, although inner classes will have their own smali file. Each smali file also contains the package to which the class belongs, and the location of smali files is hierarchical according to the package name. The smali format has .line directive that is used to populate the line numbers in stacktraces when an exception is encountered. FIG. 6 depicts an example snippet of code from the com/mvl/-core/MapViewActivity.smali class showing use of the .line directive. FIG. 7 depicts a callstack called from within the mobile application. Once a targeted API call is hooked, then the injected code runs and the analysis engine 203 can examine the call stack. Usually, the location of the hooked API method call is in a predictable location. From the instance of the call (android.accounts.AccountManager.getAccountsByType), the analysis engine 203 can search the callstack downward for the first concrete smali file. The callstack provides the fully qualified method call that enables the analysis engine 203 to locate the corresponding smali file. From there, the analysis engine 203 opens the file and the possible matches of methods are searched for the corresponding line number from the line directive. Then searching commences in all methods that have a matching line directive for the targeted API call. When the best match is found, the actual line number of the smali file can be determined. The example stacktrace, shown in FIG. 7, is from the Facebook mobile application, which has a package name of com.facebook.katana. The method being hooked is the android.accounts.AccountManager.getAccountsByType (java.lang.String) method. This method is called from the line 128 of a method of the com.facebook.katana. platform.FacebookAuthenticationUtils class. The line 128 corresponds to the line number in the Java source code. The method calls do not have parameter values. At step 307, the extraction engine 204 extracts back end URLs from the output of the analysis engine 203 and the injection framework by collecting the URLs either from the application directly or using network traffic analysis. The extraction engine 204 can store the extracted URLs in a suitable location such as the memory, an external storage location, the Cloud, and any other suitable location. At step 308, the content manager 201 determines if the application is accessing unlicensed content by comparing the paths of calls made by the application (the extracted URLs) to a whitelist dataset of sources that serve licensed content. The whitelist dataset of the sources that serve licensed content can be pre-defined or received, on demand from the owner of the copyrighted content. In an embodiment herein, the content manager 201 can enable an authorized person to manually inspect results of the analysis. At step 309, the content manager 201 raises an alert if the application is accessing unlicensed content. The content manager 201 can raise an alert using at least one of a visual and audio means. The content manager 201 can send an alert in a format such as email, a pop-up notification, a SMS (Short Messaging Service), a chat, a pre-recorded voice message, or any other suitable means. The various actions in method 300 may be performed in the order presented, in a different order or simultaneously. Further, in some embodiments, some actions listed in FIG. 3 may be omitted.

The present disclosure can use a shell script and Mobile Debugging Bridge (ADB) to perform file transfers and command execution on the electronic device. This can be done by connecting the device that performs the analysis to another external device using a USB port. Thus, an externally connected computing device can issue the Mobile Debugging Bridge software commands to the device that performs the analysis.

Embodiments herein disclose an approach that employs dynamic analysis and code instrumentation to bypass obfuscation techniques and allow the analysis of applications at scale.

FIG. 8 illustrates a plurality of components of an electronic device for detecting unlicensed content on an electronic device. Referring to FIG. 8, the electronic device 200 is illustrated in accordance with embodiments of the present subject matter. In an embodiment, the electronic device 200 may include at least one processor 801, an input/output (I/O) interface 802 (herein a configurable user interface), and a memory 803. The at least one processor 801 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitries, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the at least one processor 801 is configured to fetch and execute computer-readable instructions stored in the memory 803.

The I/O interface 802 may include a variety of software and hardware interfaces, for example, a web interface, a graphical user interface such as a display screen, a physical interface, or any other interface (either software or hardware), which will enable the user to interact with the electronic device 200.

The I/O interface 802 may allow the electronic device 200 to communicate with other devices. The I/O interface 802 may facilitate multiple communications within a wide variety of networks and protocol types, including wired networks, for example, Local Area network (LAN), cable, etc., and wireless networks, such as Wireless LAN, cellular, Device to Device (D2D) communication network, Wi-Fi networks and any other communication means. The modules 804 include routines, programs, objects, components, and data structures, which perform particular tasks, functions or implement particular abstract data types. In one implementation, the modules 804 may include a device operation module 805. The device operation module 805 can be configured to execute one or more tasks corresponding to the application on the electronic device 200 in accordance with embodiments as disclosed herein.

The modules 804 may include programs or coded instructions that supplement applications and functions of the electronic device 200. The data 806, amongst other things, serves as a repository for storing data processed, received, and generated by one or more of the modules 804. Further, the names of the other components and modules of the electronic device 200 are illustrative and need not be construed as a limitation.

The foregoing description of the specific embodiments will so fully reveal the general nature of the embodiments herein that others can, by applying current knowledge, readily modify and/or adapt for various applications such specific embodiments without departing from the generic concept, and, therefore, such adaptations and modifications should and are intended to be comprehended within the meaning and range of equivalents of the disclosed embodiments. It is to be understood that the phraseology or terminology employed herein is for the purpose of description and not of limitation. Therefore, while the embodiments herein have been described in terms of preferred embodiments, those skilled in the art will recognize that the embodiments herein can be practiced with modification within the spirit and scope of the claims as described herein. 

What is claimed is:
 1. A method for determining if an application present on an electronic device allows the electronic device to access unlicensed content, the method including: collecting, by a processor, data related to the application by the electronic device, wherein the data comprises of binary data and metadata; analyzing, by a processor, the collected data by the electronic device for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyzing, by a processor, the collected data and the dynamically called code by the electronic device; and determining, by a processor, if the application is accessing unlicensed content by the electronic device, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.
 2. The method, as claimed in claim 1, wherein the method further includes exercising, by a processor, a User Interface (UI) of the application to sample functionality of the application, before analyzing the data.
 3. The method, as claimed in claim 1, wherein the method further includes capturing, by a processor, network and file I/O (Input/Output) performed by the application.
 4. The method, as claimed in claim 1, wherein analyzing, by a processor, the collected data and the dynamically called code further includes traversing one or more control graphs of the application and third party libraries associated with the application.
 5. The method, as claimed in claim 1, wherein analyzing the collected data and the dynamically called code further includes performing, by a processor, dynamic instrumentation to determine concrete values and program states of the application.
 6. The method, as claimed in claim 1, wherein the method further includes providing an alert if the application is accessing unlicensed content.
 7. The method, as claimed in claim 1, wherein the method further comprises of extracting at least one advertising identifier from an advertising feed in the application.
 8. An apparatus operable to determine if an application present on an electronic device allows the electronic device to access unlicensed content, comprising: a processor; and a memory device, operatively connected to the processor, and having stored thereon instructions that, when executed by the processor, cause the processor to: collect data related to the application, wherein the data comprises of binary data and metadata; analyze the collected data for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyze the collected data and the dynamically called code; and determine if the application is accessing unlicensed content, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.
 9. The apparatus, as claimed in claim 8, wherein the processor is further operable to exercise User Interface (UI) of the application to sample functionality of the application, before analyzing the data.
 10. The apparatus, as claimed in claim 8, wherein the processor is further operable to capture network and file I/O (Input/Output) performed by the application.
 11. The apparatus, as claimed in claim 8, wherein the processor is further operable to analyze the collected data and the dynamically called code which further includes traversing one or more control graphs of the application and third party libraries associated with the application.
 12. The apparatus, as claimed in claim 8, wherein the processor is further operable to analyze the collected data and the dynamically called code, which further includes performing dynamic instrumentation to determine concrete values and program states of the application.
 13. The apparatus, as claimed in claim 8, wherein the processor is further operable to provide an alert, if the application is accessing unlicensed content.
 14. The apparatus, as claimed in claim 8, wherein the processor is further operable to extract at least one advertising identifier from an advertising feed in the application.
 15. A system for determining if an application present on an electronic device allows the electronic device to access unlicensed content, comprising: a content manager including circuitry configured to collect data related to the application, wherein the data comprises of binary data and metadata; an analysis module including circuitry configured to: analyze the collected data for Application Programming Interface (API) method calls from at least one of static code and dynamically called code; analyze the collected data and the dynamically called code; and the content manager further including circuitry configured to determine if the application is accessing unlicensed content, by comparing network sources of the content requests made by the applications to a whitelist dataset that matches content sources for that specific content.
 16. The system, as claimed in claim 15, wherein the system further comprises an injection engine comprising circuitry configured to exercise User Interface (UI) of the application to sample functionality of the application, before analyzing the data.
 17. The system, as claimed in claim 15, wherein the injection engine is further configured to capture network and file I/O (Input/Output) performed by the application.
 18. The system, as claimed in claim 15, wherein the analysis engine is further configured to analyze the collected data and the dynamically called code further includes traversing one or more control graphs of the application and third party libraries associated with the application.
 19. The system, as claimed in claim 15, wherein the analysis engine is further operable to analyze the collected data and the dynamically called code, which further includes performing dynamic instrumentation to determine concrete values and program states of the application.
 20. The system, as claimed in claim 15, wherein the content manager is further configured to provide an alert if the application is accessing unlicensed content.
 21. The system, as claimed in claim 15, wherein the system further comprises an extraction engine comprising circuitry configured to extract at least one advertising identifier from an advertising feed in the application. 